3.442 \(\int \frac{(a+b x)^2}{x^2 \sqrt{c+d x}} \, dx\)

Optimal. Leaf size=71 \[ -\frac{a^2 \sqrt{c+d x}}{c x}-\frac{a (4 b c-a d) \tanh ^{-1}\left (\frac{\sqrt{c+d x}}{\sqrt{c}}\right )}{c^{3/2}}+\frac{2 b^2 \sqrt{c+d x}}{d} \]

[Out]

(2*b^2*Sqrt[c + d*x])/d - (a^2*Sqrt[c + d*x])/(c*x) - (a*(4*b*c - a*d)*ArcTanh[S
qrt[c + d*x]/Sqrt[c]])/c^(3/2)

_______________________________________________________________________________________

Rubi [A]  time = 0.133403, antiderivative size = 71, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2 \[ -\frac{a^2 \sqrt{c+d x}}{c x}-\frac{a (4 b c-a d) \tanh ^{-1}\left (\frac{\sqrt{c+d x}}{\sqrt{c}}\right )}{c^{3/2}}+\frac{2 b^2 \sqrt{c+d x}}{d} \]

Antiderivative was successfully verified.

[In]  Int[(a + b*x)^2/(x^2*Sqrt[c + d*x]),x]

[Out]

(2*b^2*Sqrt[c + d*x])/d - (a^2*Sqrt[c + d*x])/(c*x) - (a*(4*b*c - a*d)*ArcTanh[S
qrt[c + d*x]/Sqrt[c]])/c^(3/2)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 12.6624, size = 60, normalized size = 0.85 \[ - \frac{a^{2} \sqrt{c + d x}}{c x} + \frac{a \left (a d - 4 b c\right ) \operatorname{atanh}{\left (\frac{\sqrt{c + d x}}{\sqrt{c}} \right )}}{c^{\frac{3}{2}}} + \frac{2 b^{2} \sqrt{c + d x}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((b*x+a)**2/x**2/(d*x+c)**(1/2),x)

[Out]

-a**2*sqrt(c + d*x)/(c*x) + a*(a*d - 4*b*c)*atanh(sqrt(c + d*x)/sqrt(c))/c**(3/2
) + 2*b**2*sqrt(c + d*x)/d

_______________________________________________________________________________________

Mathematica [A]  time = 0.105209, size = 62, normalized size = 0.87 \[ \sqrt{c+d x} \left (\frac{2 b^2}{d}-\frac{a^2}{c x}\right )+\frac{a (a d-4 b c) \tanh ^{-1}\left (\frac{\sqrt{c+d x}}{\sqrt{c}}\right )}{c^{3/2}} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b*x)^2/(x^2*Sqrt[c + d*x]),x]

[Out]

((2*b^2)/d - a^2/(c*x))*Sqrt[c + d*x] + (a*(-4*b*c + a*d)*ArcTanh[Sqrt[c + d*x]/
Sqrt[c]])/c^(3/2)

_______________________________________________________________________________________

Maple [A]  time = 0.018, size = 63, normalized size = 0.9 \[ 2\,{\frac{1}{d} \left ({b}^{2}\sqrt{dx+c}+ad \left ( -1/2\,{\frac{a\sqrt{dx+c}}{cx}}+1/2\,{\frac{ad-4\,bc}{{c}^{3/2}}{\it Artanh} \left ({\frac{\sqrt{dx+c}}{\sqrt{c}}} \right ) } \right ) \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((b*x+a)^2/x^2/(d*x+c)^(1/2),x)

[Out]

2/d*(b^2*(d*x+c)^(1/2)+a*d*(-1/2*a/c*(d*x+c)^(1/2)/x+1/2*(a*d-4*b*c)/c^(3/2)*arc
tanh((d*x+c)^(1/2)/c^(1/2))))

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x + a)^2/(sqrt(d*x + c)*x^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.231276, size = 1, normalized size = 0.01 \[ \left [-\frac{{\left (4 \, a b c d - a^{2} d^{2}\right )} x \log \left (\frac{{\left (d x + 2 \, c\right )} \sqrt{c} + 2 \, \sqrt{d x + c} c}{x}\right ) - 2 \,{\left (2 \, b^{2} c x - a^{2} d\right )} \sqrt{d x + c} \sqrt{c}}{2 \, c^{\frac{3}{2}} d x}, \frac{{\left (4 \, a b c d - a^{2} d^{2}\right )} x \arctan \left (\frac{c}{\sqrt{d x + c} \sqrt{-c}}\right ) +{\left (2 \, b^{2} c x - a^{2} d\right )} \sqrt{d x + c} \sqrt{-c}}{\sqrt{-c} c d x}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x + a)^2/(sqrt(d*x + c)*x^2),x, algorithm="fricas")

[Out]

[-1/2*((4*a*b*c*d - a^2*d^2)*x*log(((d*x + 2*c)*sqrt(c) + 2*sqrt(d*x + c)*c)/x)
- 2*(2*b^2*c*x - a^2*d)*sqrt(d*x + c)*sqrt(c))/(c^(3/2)*d*x), ((4*a*b*c*d - a^2*
d^2)*x*arctan(c/(sqrt(d*x + c)*sqrt(-c))) + (2*b^2*c*x - a^2*d)*sqrt(d*x + c)*sq
rt(-c))/(sqrt(-c)*c*d*x)]

_______________________________________________________________________________________

Sympy [A]  time = 70.9547, size = 192, normalized size = 2.7 \[ - \frac{a^{2} \sqrt{d} \sqrt{\frac{c}{d x} + 1}}{c \sqrt{x}} + \frac{a^{2} d \operatorname{asinh}{\left (\frac{\sqrt{c}}{\sqrt{d} \sqrt{x}} \right )}}{c^{\frac{3}{2}}} + 4 a b \left (\begin{cases} \frac{\operatorname{atan}{\left (\frac{1}{\sqrt{- \frac{1}{c}} \sqrt{c + d x}} \right )}}{c \sqrt{- \frac{1}{c}}} & \text{for}\: - \frac{1}{c} > 0 \\- \frac{\operatorname{acoth}{\left (\frac{1}{\sqrt{c + d x} \sqrt{\frac{1}{c}}} \right )}}{c \sqrt{\frac{1}{c}}} & \text{for}\: - \frac{1}{c} < 0 \wedge \frac{1}{c} < \frac{1}{c + d x} \\- \frac{\operatorname{atanh}{\left (\frac{1}{\sqrt{c + d x} \sqrt{\frac{1}{c}}} \right )}}{c \sqrt{\frac{1}{c}}} & \text{for}\: \frac{1}{c} > \frac{1}{c + d x} \wedge - \frac{1}{c} < 0 \end{cases}\right ) + b^{2} \left (\begin{cases} \frac{x}{\sqrt{c}} & \text{for}\: d = 0 \\\frac{2 \sqrt{c + d x}}{d} & \text{otherwise} \end{cases}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x+a)**2/x**2/(d*x+c)**(1/2),x)

[Out]

-a**2*sqrt(d)*sqrt(c/(d*x) + 1)/(c*sqrt(x)) + a**2*d*asinh(sqrt(c)/(sqrt(d)*sqrt
(x)))/c**(3/2) + 4*a*b*Piecewise((atan(1/(sqrt(-1/c)*sqrt(c + d*x)))/(c*sqrt(-1/
c)), -1/c > 0), (-acoth(1/(sqrt(c + d*x)*sqrt(1/c)))/(c*sqrt(1/c)), (-1/c < 0) &
 (1/c < 1/(c + d*x))), (-atanh(1/(sqrt(c + d*x)*sqrt(1/c)))/(c*sqrt(1/c)), (-1/c
 < 0) & (1/c > 1/(c + d*x)))) + b**2*Piecewise((x/sqrt(c), Eq(d, 0)), (2*sqrt(c
+ d*x)/d, True))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.215179, size = 100, normalized size = 1.41 \[ \frac{2 \, \sqrt{d x + c} b^{2} - \frac{\sqrt{d x + c} a^{2} d}{c x} + \frac{{\left (4 \, a b c d - a^{2} d^{2}\right )} \arctan \left (\frac{\sqrt{d x + c}}{\sqrt{-c}}\right )}{\sqrt{-c} c}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x + a)^2/(sqrt(d*x + c)*x^2),x, algorithm="giac")

[Out]

(2*sqrt(d*x + c)*b^2 - sqrt(d*x + c)*a^2*d/(c*x) + (4*a*b*c*d - a^2*d^2)*arctan(
sqrt(d*x + c)/sqrt(-c))/(sqrt(-c)*c))/d